/**
 * Created by LC on 2019/11/14
 */
package com.hw.paltfrom.controller.supervisor;

import com.hw.paltfrom.service.supervisor.SupervisorManagerServer;
import com.hw.paltfrom.vo.SupervisionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("supervision")
public class SupervisorManagerController {

    @Autowired
    SupervisorManagerServer supervisorManagerServer;

    /**
     * 查询
     * @return
     */
    @RequestMapping("query")
    public Map<String,Object> query(SupervisionVo vo){
        return supervisorManagerServer.query(vo);
    }

    /**
     * 创建
     * @param vo
     * @return
     */
    @RequestMapping("create")
    public Map<String,Object> create(SupervisionVo vo){
        return supervisorManagerServer.create(vo);
    }

    /**
     * 详情
     * @param F_SpvId
     * @return
     */
    @RequestMapping("detail")
    public Map<String,Object> detail(String F_SpvId){
        return supervisorManagerServer.detail(F_SpvId);
    }

    /**
     * 修改
     * @param vo
     * @return
     */
    @RequestMapping("update")
    public Map<String,Object> update(SupervisionVo vo){
        return supervisorManagerServer.update(vo);
    }

    /**
     * 删除
     * @param vo
     * @return
     */
    @RequestMapping("delete")
    public Map<String,Object> delete(SupervisionVo vo){
        return supervisorManagerServer.delete(vo);
    }

    /**
     * 查单位
     */
    @RequestMapping("findType")
    public Map<String,Object> findType(String type){
        return supervisorManagerServer.queryDepList(type);
    }
}
